const getHttpCat = require('../../models/http')
Page({
  data: {
    playlists:[]
  },
  onLoad: function (options) {
    this.getHttpData()
  },
  onReachBottom: function () {
    this.getHttpData()
  },
  getHttpData(){
    getHttpCat({
      offset:this.data.playlists.length,
      success:res=>{
        let playlists=[...this.data.playlists,...res.data.playlists]
        this.setData({
          playlists
        })
      }
    })
  }
})